package com.gf.pokemon.dto;

import java.util.Date;
import java.util.List;

import com.gf.pokemon.platform.exception.PokeException;
import com.gf.pokemon.util.PokeUtils;

public class VoteDto {
    private Integer id;

    private Short status;

    private String title;

    private String theme;

    private Short vmode;

    private String overDateStr;
    
    private Date overDate;

    private Date createDate;

    private String createUser;

    private String memo;
    
    private List<VoteOptionDto> voteOptionDtos;
    
    private List<VoteMsgDto> voteMsgDtos;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Short getStatus() {
        return status;
    }

    public void setStatus(Short status) {
        this.status = status;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title == null ? null : title.trim();
    }

    public String getTheme() {
        return theme;
    }

    public void setTheme(String theme) {
        this.theme = theme == null ? null : theme.trim();
    }

    public Short getVmode() {
        return vmode;
    }

    public void setVmode(Short vmode) {
        this.vmode = vmode;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public String getCreateUser() {
        return createUser;
    }

    public void setCreateUser(String createUser) {
        this.createUser = createUser == null ? null : createUser.trim();
    }

    public String getMemo() {
        return memo;
    }

    public void setMemo(String memo) {
        this.memo = memo == null ? null : memo.trim();
    }

	public List<VoteOptionDto> getVoteOptionDtos() {
		return voteOptionDtos;
	}

	public void setVoteOptionDtos(List<VoteOptionDto> voteOptionDtos) {
		this.voteOptionDtos = voteOptionDtos;
	}

	public List<VoteMsgDto> getVoteMsgDtos() {
		return voteMsgDtos;
	}

	public void setVoteMsgDtos(List<VoteMsgDto> voteMsgDtos) {
		this.voteMsgDtos = voteMsgDtos;
	}

	public String getOverDateStr() {
		return overDateStr;
	}

	public void setOverDateStr(String overDateStr) throws PokeException {
		if(overDateStr!=null){
			overDate = PokeUtils.parseDateStr(overDateStr);
		}
		this.overDateStr = overDateStr;
	}

	public Date getOverDate() {
		return overDate;
	}

	public void setOverDate(Date overDate) throws PokeException {
		if(overDate!=null){
			overDateStr = PokeUtils.parseDate(overDate);
		}
		this.overDate = overDate;
	}
}
